<template>
  <div class="markdown">
    <h1>统计栏</h1>
    <a-row :gutter="20">
      <a-col :span="12">
        <MdPreview :val="demo1" :show="false" desName="统计栏一">
          <template slot="code">
            <Count1 />
          </template>
          <template slot="des">
              <p><span>图片下载：</span></p>
              <ul>
                <li><a @click="downloadBtn(fileList1, 'count1.zip')">count1.zip</a></li>
              </ul>
          </template>
        </MdPreview>
        <MdPreview :val="demo3" :show="false" desName="统计栏三">
          <template slot="code">
            <Count3 />
          </template>
          <template slot="des">
              <p><span>图片下载：</span></p>
              <ul>
                <li><a @click="downloadBtn(fileList3, 'count3.zip')">count3.zip</a></li>
              </ul>
          </template>
        </MdPreview>
        <MdPreview :val="demo5" :show="false" desName="统计栏五">
          <template slot="code">
            <Count5 />
          </template>
          <template slot="des">
              <p><span>图片下载：</span></p>
              <ul>
                <li><a @click="downloadBtn(fileList5, 'count5.zip')">count5.zip</a></li>
              </ul>
          </template>
        </MdPreview>
      </a-col>
      <a-col :span="12">
        <MdPreview :val="demo2" :show="false" desName="统计栏二">
          <template slot="code">
            <Count2 />
          </template>
          <template slot="des">
              <p><span>图片下载：</span></p>
              <ul>
                <li><a @click="downloadBtn(fileList2, 'count2.zip')">count2.zip</a></li>
              </ul>
          </template>
        </MdPreview>
        <MdPreview :val="demo4" :show="false" desName="统计栏四">
          <template slot="code">
            <Count4 />
          </template>
          <template slot="des">
              <p><span>图片下载：</span></p>
              <ul>
                <li><a @click="downloadBtn(fileList4, 'count4.zip')">count4.zip</a></li>
              </ul>
          </template>
        </MdPreview>
      </a-col>
    </a-row>
  </div>
</template>

<script>
import { download } from '@/mixins/download.js';

import Count1 from "@/views/comps/components/count1.vue";
import Count2 from "@/views/comps/components/count2.vue";
import Count3 from "@/views/comps/components/count3.vue";
import Count4 from "@/views/comps/components/count4.vue";
import Count5 from "@/views/comps/components/count5.vue";
export default {
    mixins: [download],
    components: {
      Count1,
      Count2,
      Count3,
      Count4,
      Count5,
    },
    data() {
      return {
        demo1: `
<template>
  <div class="center_box">
    <div class="clear">
      <div class="xs-3">
        <div class="xs-5">
          <div class="icon_b">
            <i class="spin"></i>
            <img :src="require('@/assets/images/count/count1/icon_c7.png')" />
          </div>
        </div>
        <div class="xs-7">
          <h3 class="num_b">332<span>次</span></h3>
          <p class="p_b">累计报警</p>
        </div>
      </div>
      <div class="xs-3">
        <div class="xs-5">
          <div class="icon_b">
            <i class="spin"></i>
            <img :src="require('@/assets/images/count/count1/icon_c8.png')" />
          </div>
        </div>
        <div class="xs-7">
          <h3 class="num_b">332<span>次</span></h3>
          <p class="p_b">累计报修</p>
        </div>
      </div>
      <div class="xs-3">
        <div class="xs-5">
          <div class="icon_b">
            <i class="spin"></i>
            <img :src="require('@/assets/images/count/count1/icon_c9.png')" />
          </div>
        </div>
        <div class="xs-7">
          <h3 class="num_b">332<span>次</span></h3>
          <p class="p_b">当前异常</p>
        </div>
      </div>
      <div class="xs-3">
        <div class="xs-5">
          <div class="icon_b">
            <i class="spin"></i>
            <img :src="require('@/assets/images/count/count1/icon_c10.png')" />
          </div>
        </div>
        <div class="xs-7">
          <h3 class="num_b">332<span>个</span></h3>
          <p class="p_b">设备总数</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
    data() {
      return {

      }
    }
}
<\/script>

<style lang="less" scoped>
.center_box{border: 1px solid #558ecb; box-shadow: 0px 0px 5px rgba(0,0,0,0.2); background:rgba(1,32,108,0.9); padding: 12px; position: relative;}
.center_box:after{content: ''; display: block; position: absolute; height: 100%; width: 4px; left: 0px; background: url(~@/assets/images/count/count1/bor_a.png)no-repeat center; top: 0px;}
.center_box:before{content: ''; display: block; position: absolute; height: 100%; width: 4px; right: 0px; background: url(~@/assets/images/count/count1/bor_a1.png)no-repeat center; top: 0px;}
.center_box .num_b{line-height: 30px;}
.center_box .p_b{margin-top: -5px; margin-bottom: 0}

.icon_b{width: 46px; height: 46px; position: relative; background: url(~@/assets/images/count/count1/icon_c_bg_b.png) no-repeat center;}
.icon_b>i{display: block; width: 100%; height: 100%; position: absolute; background: url(~@/assets/images/count/count1/icon_c_bg_a.png) no-repeat center;}

.num_b{margin: 0px; color: #93fefe; font-size: 30px;font-family: Digiface; margin-top: 0px;background-image: -webkit-gradient(linear, 0 40%, 0 bottom, from(#8af3f8), to(#45cff8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;}
.num_b>span{font-size: 14px;}

.xs-3{width: 25%; float: left;}
.xs-5{width: 31.66%; float: left;}

.spin { animation: 3s linear 0s normal infinite running spin;}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(359deg);
  }
}
</style>
        `,
        demo2: `
 <template>
  <div class="sales-volume">
    <h1>统计栏</h1>
    <span class="dan_w">个</span>
    <div class="numberRun">
      <div class="number_span">1</div>
      <div class="number_span">2</div>
      <div class="number_span">3</div>
      <div class="number_span">4</div>
      <div class="number_span">5</div>
      <div class="number_span">6</div>
    </div>
    <i class="moves1a"></i>
  </div>
</template>

<script>
export default {
    data() {
      return {

      }
    }
}
<\/script>

<style lang="less" scoped>
.sales-volume { background: url(~@/assets/images/count/count2/bg_a.png) no-repeat center top; width: 254px;  height: 94px; z-index: 9; padding: 0px 20px; background-size:100% 100%; position: relative;}
.sales-volume h1 { font-size: 15px; color: #fff; text-align: center; line-height: 36px; font-weight: normal; padding-left: 4px; margin-bottom: 0;}
.sales-volume i { display: block; position: absolute; bottom: -6px; left: 3%;  background: url(~@/assets/images/count/count2/sy_xl_bg-light.png) no-repeat; width: 90px; height: 18px;}
.sales-volume > span {
  font-size: 14px;
  padding: 0 10px;
}
.dan_w {
  display: inline-block;
  position: absolute;
  right: 10px;
  top: 20px;
  color: #f8eb16;
  font-size: 18px;
}
.numberRun{
  display: flex;
  margin: 10px 0;
  justify-content: center;
}
.number_span {
  background: url(~@/assets/images/count/count2/bg_num.png);
  background-size: 100% 100%;
  font-family: Digiface;
  width: 30px;
  height: 35px;
  font-size: 24px;
  color: #f8eb16;
  text-align: center;
  margin: 0 2px;
}

.moves1a { animation: 2s linear 0s normal infinite running moves1a;}
@keyframes moves1a {
  0% {
    left: 0%;
    opacity: 0.4;
  }
  30% {
    left: 30%;
    opacity: 1;
  }
  60% {
    left: 60%;
    opacity: 0.6;
  }
  100% {
    left: calc(100% - 90px);
    opacity: 0;
  }
}
</style>
        `,
        demo3: `
<template>
  <div class="nox">
    <div class="boximg">
      <img :src="require('@/assets/images/count/count3/vb1.png')">
    </div>
    <div class="boxtxt">
      <span>8365604<small>条</small></span>
      <p>人口数据</p>
    </div>
  </div>
</template>

<script>
export default {
    data() {
      return {

      }
    }
}
<\/script>

<style lang="less" scoped>
.nox {
  width: 340px;
  height: 90px;
  background: url(~@/assets/images/count/count3/dsa.png);
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boximg {
  position: relative;
  width: 66px;
  height: 66px;
  text-align: center;
}

.boximg::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: url(~@/assets/images/count/count3/cuio.png);
  animation: 5s linear 0s normal infinite running spin;
}

.boxtxt {
  color: #fff;
  text-align: left;
}

.boxtxt p {
  font-size: 16px;
  margin: 0;
}

.boxtxt span {
  display: inline-block;
  font-size: 24px;
  font-family: 'Bahnschrift';
  background-image: -webkit-linear-gradient(top, #99efff, #00f0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
  line-height: 24px;
}

.spin { animation: 3s linear 0s normal infinite running spin;}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(359deg);
  }
}
</style>
        `,
        demo4: `
 <template>
  <div class="ping_item">
    <div class="p_bg">
      <p>4740<span>个</span></p>
    </div>
    <p class="tCenter">目录资源总数</p>
  </div>
</template>

<script>
export default {
    data() {
      return {

      }
    }
}
<\/script>

<style lang="less" scoped>
.ping_item{
  width: 147px;
}
.ping_item .p_bg{
  width: 147px;
  height: 101px;
  background:url(~@/assets/images/count/count4/ping_bg.png)no-repeat center;
  text-align: center;
  margin-bottom: 6px;
}
.ping_item .p_bg p{
  line-height: 101px;
  background: linear-gradient(0deg, #F9E468 0%, #F7BF29 92.48046875%);
  font-family: Bahnschrift;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  font-size: 30px;
  font-weight: bold;
}
.ping_item .p_bg p>span{
  font-size: 16px;
}
</style>
        `,
        demo5: `
 <template>
  <div class="item_a">
    <div class="item_a_img">
      <img :src="require('@/assets/images/count/count5/td_c2.png')">
    </div>
    <p>全市景气指数</p>
    <h3>3658</h3>
  </div>
</template>

<script>
export default {
    data() {
      return {

      }
    }
}
<\/script>

<style lang="less" scoped>
.item_a {
  width: 112px;
  text-align: center;
  position: relative;
}
.item_a_img {
  background: url(~@/assets/images/count/count5/icon_c_bg.png) no-repeat center bottom;
}

.item_a p {
  margin: 0;
  color: #fff;
  font-size: 14px;
}

.item_a h3 {
  margin: 0;
  font-size: 21px;
  font-weight: bold;
  background: linear-gradient(0deg, #FFD667 0.5126953125%, #FFC425 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 21px;
}

.item_a h3 span {
  font-size: 14px;
}

.item_a_img img{
  animation: 4s linear  infinite rot;
}
@keyframes rot{
    0%{transform: rotateY(0deg);}

    25%{transform: rotateY(360deg);}
    100%{transform: rotateY(360deg);}
}
</style>
        `,
        fileList1: [
          {
            fileName: 'bor_a.png',
            feilePath: '/static/count/count1/bor_a.png'
          },{
            fileName: 'bor_a1.png',
            feilePath: '/static/count/count1/bor_a1.png'
          },{
            fileName: 'icon_c_bg_a.png',
            feilePath: '/static/count/count1/icon_c_bg_a.png'
          },{
            fileName: 'icon_c_bg_b.png',
            feilePath: '/static/count/count1/icon_c_bg_b.png'
          },{
            fileName: 'icon_c7.png',
            feilePath: '/static/count/count1/icon_c7.png'
          },{
            fileName: 'icon_c8.png',
            feilePath: '/static/count/count1/icon_c8.png'
          },{
            fileName: 'icon_c9.png',
            feilePath: '/static/count/count1/icon_c9.png'
          },{
            fileName: 'icon_c10.png',
            feilePath: '/static/count/count1/icon_c10.png'
          },
        ],
        fileList2: [
          {
            fileName: 'bg_a.png',
            feilePath: '/static/count/count2/bg_a.png'
          },{
            fileName: 'bg_num.png',
            feilePath: '/static/count/count2/bg_num.png'
          },{
            fileName: 'sy_xl_bg-light.png',
            feilePath: '/static/count/count2/sy_xl_bg-light.png'
          },
        ],
        fileList3: [
          {
            fileName: 'cuio.png',
            feilePath: '/static/count/count3/cuio.png'
          },{
            fileName: 'dsa.png',
            feilePath: '/static/count/count3/dsa.png'
          },{
            fileName: 'vb1.png',
            feilePath: '/static/count/count3/vb1.png'
          },
        ],
        fileList4: [
          {
            fileName: 'ping_bg.png',
            feilePath: '/static/count/count4/ping_bg.png'
          },
        ],
        fileList5: [
          {
            fileName: 'icon_c_bg.png',
            feilePath: '/static/count/count5/icon_c_bg.png'
          },{
            fileName: 'td_c2.png',
            feilePath: '/static/count/count5/td_c2.png'
          },
        ],
      }
    }
}
</script>

<style scoped>

</style>